﻿using System;
using System.Collections.Generic;
using BillsDomain;

namespace BillsPresentation
{
    /// <summary>
    /// Describes the properties and methods provided by a scheduled payment controller.
    /// </summary>
    public interface IScheduledPaymentController
    {
        /// <summary>
        /// Gets the current scheduled payment.
        /// </summary>
        /// <value>The current scheduled payment.</value>
        ScheduledPayment CurrentScheduledPayment { get; }

        /// <summary>
        /// Sets the scheduled payment.
        /// </summary>
        /// <param name="id">The id.</param>
        void SetScheduledPayment(int id);

        /// <summary>
        /// Saves the data.
        /// </summary>
        void SaveData();

        /// <summary>
        /// Loads the data.
        /// </summary>
        void LoadData();

        void SaveData(string pathAndFilename);

        void LoadData(string pathAndFileName);

        //TODO: Replace with bindinglist
        /// <summary>
        /// Gets the scheduled payments.
        /// </summary>
        /// <value>The scheduled payments.</value>
        List<ScheduledPayment> ScheduledPayments { get; }

        /// <summary>
        /// Occurs when the scheduled payment list changes.
        /// </summary>
        event EventHandler ListChanged;

        /// <summary>
        /// Updates the list with the given payment.
        /// </summary>
        /// <param name="payment">The payment.</param>
        void UpdateListWith(ScheduledPayment payment);

        /// <summary>
        /// Deletes the current payment.
        /// </summary>
        void DeleteCurrentPayment();
    }
}
